<div class="portlet">
  <div class="portlet-header">
    <h1><%=t ".title"%></h1>
  </div>
  <div class="portlet-content">

	<% form_for resource_name, resource, :url => registration_path(resource_name), :html => { :method => :put } do |f| -%>
	  <%= f.error_messages %>
          <table>
            <tbody>
              <tr>
                <td> <%= f.label t('activerecord.attributes.user.email') %> </td>
                <% contact = Contact.find_by_user_id(current_user.id) %>
                <% if !contact.nil? %>
                  <td> <%= f.text_field :email, {:disabled => true} %> </td>
                  <td><%=t('lbl_user_update_contact_mail')%></td>
                <% else %>
                  <td> <%= f.text_field :email %> </td>
                <% end %>

              </tr>
              <tr>
                <td>
                  <%= f.label t('activerecord.attributes.user.password') %> <br/>
                </td>
                <td>
                  <%= f.password_field :password %>
                </td>
                <td>
                  <%= t('devise.passwords.lbl_edit_user_password')%>
                </td>
              </tr>
              <tr>
                <td>
                  <%= f.label t('activerecord.attributes.user.password_confirm') %>
                </td>
                <td>
                  <%= f.password_field :password_confirmation %>
                </td>
              </tr>
              <tr>
                <td>
                  <%= f.label t('activerecord.attributes.user.current_password')%> <br/>
                </td>
                <td>
                  <%= f.password_field :current_password %>
                </td>
                <td>
                  <%= t('devise.passwords.lbl_edit_user_password_confirm')%>
                </td>
              </tr>

          </tbody>
	</table>

        <div class="line-links">
          <%= f.submit t('btn_save') %> <br/>
        </div>
        <!--
        <div class="line-links">
          <%#= link_to t('devise.registrations.lbl_cancel_account'), registration_path(resource_name), :confirm => t('msg_sure_destroy?'), :method => :delete %> |	<%#= render :partial => "shared/devise_links" %>
        </div>
        -->
      <% end -%>
  </div>

  <div class="portlet-footer">
  </div>
</div>
